<section *ngIf="showForm">
  <nz-tabset [nzTabPosition]="nzTabPosition">
    <nz-tab nzTitle="用户信息">
      <div class="clearfix" nz-row>
        <nz-form-item style="margin-bottom: 0;" nz-col nzSpan="8">
          <nz-form-label [nzSpan]="8" style="width: 150px;" nzFor="email">照片</nz-form-label>
          <nz-form-control [nzSpan]="8">
        <nz-upload
        nzListType="picture-card"
        [nzShowUploadList]="false"
        nzAccept="image/*"
        >
        <img *ngIf="show" [src]="avatarUrl" style="width: 100%;height:102px;object-fit: cover;" />
        </nz-upload>
      </nz-form-control>
    </nz-form-item >
        <nz-modal [nzVisible]="previewVisible" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible = false">
          <ng-template #modalContent>
            <img [src]="previewImage" [ngStyle]="{ width: '100%' }" />
          </ng-template>
        </nz-modal>
      </div>
      <sf [formData]="param" [schema]="schema" (formSubmit)="formSubmit($event)"></sf>
    </nz-tab>
    <nz-tab nzTitle="修改人脸">
      <div class="clearfix" nz-row>
        <nz-form-item style="margin-bottom: 0;" nz-col nzSpan="8">
          <nz-form-label [nzSpan]="8" style="width: 50px;" nzFor="email">照片</nz-form-label>
          <nz-form-control [nzSpan]="8">
        <nz-upload
          nzListType="picture-card"
          [nzShowUploadList]="false"
          nzAccept="image/*"
          (nzChange)="handleChange($event)"
        >
        <img *ngIf="showUpdate" [src]="avatarUrl2" alt="" style="width: 100%;height: 102px;object-fit: cover;">
        </nz-upload>
      </nz-form-control>
    </nz-form-item >
      </div>
      <nz-form-item>
        <nz-form-control [nzSpan]="8">
          <button nz-button nzType="primary" style="margin-left:15%;width:104px" (click)="takePhoto()">拍照</button>
        </nz-form-control>
      </nz-form-item >
      <nz-form-item style="text-align: center;margin-top: 40px;">
        <div style="display: inline-block">
          <button nz-button nzType="primary" (click)="submit()">提交</button>
          <button nz-button (click)="resetForm()">取消</button>
        </div>
      </nz-form-item>
    </nz-tab>
    <nz-tab nzTitle="门卡信息">
      <app-table-page #st [config]="config2"></app-table-page>
    </nz-tab>
    <!-- <nz-tab nzTitle="权限信息">
      <sf [formData]="param" [schema]="schema2" (formSubmit)="formSubmit($event)" [button]="null"></sf>
    </nz-tab> -->
    <nz-tab nzTitle="房间信息">
      <app-table-page #st [config]="config"></app-table-page>
    </nz-tab>
    <nz-tab nzTitle="人脸信息">
      <app-table-page #faceInfo [config]="faceConfig" (operateClick)="operate($event)"></app-table-page>
    </nz-tab>
  </nz-tabset>
</section>
